package com.xueyl.springboot.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.xueyl.springboot.domain.User;

@Mapper
public interface UserMapper {

	@Insert(value="insert into user(id,name,age) values(#{id},#{name},#{age})")
	public void save(@Param("id") Integer id,@Param("name") String name, @Param("age") Integer age);
	
	@Select(value="select * from user t where t.name=#{name}")
	public User findByName(@Param("name") String name);
	
}
